/*
 *	Filename: Quadrotor_ePwm.h
 *	Fuction: Header File
 *	Modified: 2016-11-09
 *	Author: Bin
 */

#ifndef QUADROTOR_EPWM_H
#define QUADROTOR_EPWM_H

#define EPWM_TIMER_TBPRD	31250
#define EPWM_INIT_CMPA		1562
#define EPWM_INIT_CMPB		1562
#define HSPCLK_DIV12		0x06
#define CLK_DIV8			0x03
//TBCLK=1.5625MHz Period=20ms

extern void setEPwm1A(Uint16 value);
extern void setEPwm1B(Uint16 value);
extern void setEPwm2A(Uint16 value);
extern void setEPwm2B(Uint16 value);

extern void InitEPwmGpioAll(void);
extern void InitEPwmAll(void);

extern void InitEPwm1Gpio(void);
extern void InitEPwm2Gpio(void);

extern void InitEPwmx(volatile struct EPWM_REGS *regAddr);

#endif
